#ifndef WORLD_H
#define WORLD_H

#include <vector>
#include "entity.h"
#include "playercontroller.h"
#include "object.h"


using namespace std;

class PlayerController;
class ComputerController;

class World
{
    static World self;
    vector<PlayerController*> players;
    vector<Entity*> entities;
public:
    World();

    void reset();

    static World& instance() {return self;}
    void updateEntities();
    vector<Entity*>* getEntities() {return &entities;}
    void addEntity(Entity *ent);
    void addPlayer(int team);
    ComputerController* addComputer(int team);
    vector<PlayerController*> getPlayers() {return players;}
    PlayerController *getPlayerById(int id) {return players[id];}

};

#endif // WORLD_H
